package environment;

import java.awt.Point;

public class Cell extends Point{
	
	private static final long serialVersionUID = 1L;
	private boolean up = true;
	private boolean right = true;
	private boolean down = true;
	private boolean left = true;

	public boolean isUp() {
		return up;
	}

	public void setUp(boolean up) {
		this.up = up;
	}

	public boolean isRight() {
		return right;
	}

	public void setRight(boolean right) {
		this.right = right;
	}

	public boolean isDown() {
		return down;
	}

	public void setDown(boolean down) {
		this.down = down;
	}

	public boolean isLeft() {
		return left;
	}

	public void setLeft(boolean left) {
		this.left = left;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj != null && obj instanceof Cell) {
			return ((Cell)obj).x == x && ((Cell)obj).y == y;
		} else {
			return false;
		}
	}

	@Override
	public String toString() {
		return "Cell location=" + this.getX() + " - " + this.getY();
	}
}
